import {createApp} from 'vue'
import App from '@/App'
import 'normalize.css'
import '@/assets/css/font.css'
import '@/assets/iconfont/iconfont.css'
import 'leaflet/dist/leaflet.css'
import 'ol/ol.css'
import setupPlugins from '@/plugins'
import {allThemeMap} from '@visactor/vchart-theme'
import VChart from '@visactor/vchart'

const app = createApp(App)
// 注册插件
app.use(setupPlugins)
app.mount('#app')

app.config.globalProperties.$icon = (icon) => {
    return elementPlusIcons[icon]
}

// register themes
allThemeMap.forEach((theme, name) => {
    VChart.ThemeManager.registerTheme(name, theme)
})

// apply a theme
VChart.ThemeManager.setCurrentTheme('vScreenVolcanoBlue')

import '@/assets/css/main.scss'
